From 7c6e96a734ef1bc8ea80f71f0861096e205d0794 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 10 Dec 2008 14:12:54 +0000 Subject: [PATCH] API: (bug 16581) Fix regression from r44015 ("Various minor cleanup") which changed Article::replaceSection() to treat $section=null as $section=0 rather than $section='' as it did before, causing a nasty API edit bug. When changing a function's behavior, please update the callers, and don't forget the API. --- includes/api/ApiEditPage.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index acd657979d..c69d506b53 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -116,6 +116,8 @@ class ApiEditPage extends ApiBase { $this->dieUsage("The section parameter must be set to an integer or 'new'", "invalidsection"); $reqArr['wpSection'] = $params['section']; } + else + $reqArr['wpSection'] = ''; if($params['watch']) $watch = true; -- 2.20.1